<%-- 
    Document   : viewQuestions
    Created on : 28-nov-2012, 18:16:27
    Author     : Marco
--%>
<%@page contentType="text/html" pageEncoding="windows-1252"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>32Learn</title>
    </head>
    <body>
        <c:choose>
            <c:when test="${userLevel == null}">
                <%@include file="errorPage.jsp"%>
            </c:when><c:otherwise>
                <b>${inhoud.manageSTT}:</b><br>
                ${viewedQuestion.content}<br>
                <b>${inhoud.manageSTT2}:</b><br>
                <c:choose>
                    <c:when test="${viewedQuestion.answer != null}">
                        ${viewedQuestion.answer}
                    </c:when>
                </c:choose>
                <c:choose>
                    <c:when test="${userLevel == 2}">
                        <c:choose>
                            <c:when test="${viewedQuestion != null}">
                                <form  id="viewAnswerForm" method="post" action="answerQuestion?id=${viewedQuestion.questionID}">
                                    <input type="textfield" id="questionAnswer" name="questionAnswer" value="${viewedQuestion.answer}"></input>
                                    <input type="button" value="Answer question" onclick="submitForm('viewAnswerForm','viewAnswer');">
                                </form>
                            </c:when>
                        </c:choose>
                    </c:when>
                </c:choose>
            </c:otherwise></c:choose>
    </body>
</html>
